#ifndef _NE_RENDER_OPTION_H_
#define _NE_RENDER_OPTION_H_

#include <graphics/RenderSystemDefine.h>

namespace ne
{
    class NEAPI RenderOption
    {
        public:
            RenderOption()
                : colorWriteMask(CM_RGBA),
                  depthTestFunc(CF_LEQUAL),
                  depthTestEnable(true),
                  depthWriteEnable(true),
                  cullFace(FT_BACK),
                  cullFaceEnable(true),
                  polygonOffsetFactor(0.0f),
                  polygonOffsetUnits(0.0f),
                  blendColorEquation(BE_ADD),
                  blendSrcColorFunc(BF_SRC_ALPHA),
                  blendDstColorFunc(BF_ONE_MINUS_SRC_ALPHA),
                  blendEnable(false)
            {
            }

            RenderOption(const RenderOption &ro)
                : colorWriteMask(ro.colorWriteMask),
                  depthTestFunc(ro.depthTestFunc),
                  depthTestEnable(ro.depthTestEnable),
                  depthWriteEnable(ro.depthWriteEnable),
                  cullFace(ro.cullFace),
                  cullFaceEnable(ro.cullFaceEnable),
                  polygonOffsetFactor(ro.polygonOffsetFactor),
                  polygonOffsetUnits(ro.polygonOffsetUnits),
                  blendColorEquation(ro.blendColorEquation),
                  blendSrcColorFunc(ro.blendSrcColorFunc),
                  blendDstColorFunc(ro.blendDstColorFunc),
                  blendEnable(ro.blendEnable)
            {
            }

            RenderOption& operator = (const RenderOption &ro)
            {
                colorWriteMask = ro.colorWriteMask;
                depthTestFunc = ro.depthTestFunc;
                depthTestEnable = ro.depthTestEnable;
                depthWriteEnable = ro.depthWriteEnable;
                cullFace = ro.cullFace;
                cullFaceEnable = ro.cullFaceEnable;
                polygonOffsetFactor = ro.polygonOffsetFactor;
                polygonOffsetUnits = ro.polygonOffsetUnits;
                blendColorEquation = ro.blendColorEquation;
                blendSrcColorFunc = ro.blendSrcColorFunc;
                blendDstColorFunc = ro.blendDstColorFunc;
                blendEnable = ro.blendEnable;
                return *this;
            }

            ~RenderOption()
            {
            }

        public:
            byte colorWriteMask;
            CompareFunction depthTestFunc;
            bool depthTestEnable;
            bool depthWriteEnable;
            FaceType cullFace;
            bool cullFaceEnable;
            real polygonOffsetFactor;
            real polygonOffsetUnits;
            BlendEquation blendColorEquation;
            BlendFunction blendSrcColorFunc;
            BlendFunction blendDstColorFunc;
            bool blendEnable;
    };
}

#endif
